﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GN.Pay.TradeChannel.WeiXin.Request;

namespace GN.Pay.TradeChannel.WeiXin
{
    /// <summary>
    /// 微信h5支付
    /// </summary>
    [Serializable]
    public class WeiXinH5PayService : WeiXinServiceBase
    {
        public override string TradeType
        {
            get
            {
                return "MWEB";
            }
        }

        public override ChannelType ChannelType
        {
            get
            {
                return ChannelType.WebApp;
            }
        }

        public override string ChannelId
        {
            get
            {
                return "WeiXin.MWEB";
            }
        }

        public override string ChannelName
        {
            get
            {
                return "微信H5支付";
            }
        }

        public override ITradePayApplyResult PayApply(IOrderPayApply order)
        {
            var config = this.channelConfigure;
            var request = new H5PayRequest(this, order, config);
            return request.Build(this, config);
        }
    }
}
